from django.db import models


# Create your models here.

class BaseModel(models.Model):
	CreateTime = models.DateTimeField(auto_now_add=True, null=True)
	UpdateTime = models.DateTimeField(auto_now=True, null=True)
	#def __init__(self):
	#	self.MODEL_CLASS = self.__class__.__name__
	#def find_one(self, filter_kw: dict):
	#	print(1111111111);
	#	print(self.MODEL_CLASS);
	#	print(self.MODEL_CLASS);
	#	print(self.MODEL_CLASS);
	#	print(self.MODEL_CLASS);
	#	qs = self.MODEL_CLASS.objects.filter(**filter_kw)
	#	#return qs.first()


	class Meta:
		abstract = True




class UserInfo(BaseModel):
	KeyId = models.CharField(max_length=36,primary_key=True)
	UserName = models.CharField(max_length=32)
	PassWord = models.CharField(max_length=32)
	Remark = models.CharField(max_length=32)



class UserInfoGroup(BaseModel):
	KeyId = models.CharField(max_length=36,primary_key=True)
	GroupName = models.CharField(max_length=32)
	Remark = models.CharField(max_length=32)


